package order;

import javax.servlet.http.HttpSession;

public class ProcessUtil {
    public static String getUserIdBySessionId(HttpSession session){
        Object user = session.getAttribute("user");
        if (user != null){
            String userId = user.toString().split("_")[1];
            return userId;
        }
        return "";
    }
    public static String getUserNameBySessionId(HttpSession session){
        Object user = session.getAttribute("user");
        if (user != null){
            String userId = user.toString().split("_")[0];
            return userId;
        }
        return "";
    }
}
